package com.mbigger.hessionclient;

import com.mbigger.hessionserver.AnotherService;
import com.mbigger.hessionserver.HessionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HessionClientController {
    @Autowired
    private HessionService hessionService;

    @Autowired
    private AnotherService anotherService;

    /**
     * localhost:9100/another
     */
    @GetMapping("/another")
    public String another() {
        return anotherService.another();
    }

    @GetMapping("/sayHello")
    public String sayHello() {
        return hessionService.sayHello();
    }

    @GetMapping("/chat")
    public String chat() {
        return hessionService.chat();
    }

    @GetMapping("/sayByebye")
    public String sayByebye() {
        return hessionService.sayByebye();
    }
}
